<?
	require_once "../../_func/__Global.php";
	require_once "../../_func/__Local.php";
	require_once "../../_func/__MysqlFunc.php";
	require_once "../../_func/_BoardFunc.php";
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>:: 농협전북지부 ERP시스템 ::</title>
<link href="/css/layout.css" type="text/css" rel="stylesheet" />
</head>
<body>
<div id="wrap">
	<!-- header start -->
	<? include("../_layout/head.inc"); ?>
	<!-- header end -->

	<!-- board include -->
	<? include("../_layout/boardList.inc"); ?>
	<!-- board include -->
	<script src="/js/bbs.js"></script>

<!-- container start -->
	<div id="container">
    	<div class="subtit">
        	<p class="<?= $subtt_class?>"><span>게시판 > <?= $bbs_name?></span></p>
		</div>
        <div class="contents">
        	<p>[총 <?echo $totalcount?>개의 게시물]</p>
        	<table cellpadding="0" cellspacing="1" border="0" class="bbsTable">
            	<colgroup>
				<col width="4%" />
                <col width="*" />
                <col width="50" />
                <col width="70" />
                <col width="100" />
                <col width="50" />
                </colgroup>
            	<tr>
                    <th>번호</th>
                    <th>제목</th>
                    <th>첨부</th>
                    <th>작성자</th>
                    <th>작성일</th>
                    <th>조회수</th>
				</tr>
<?
	if ($list->getLength() == 0)
	{
?>
                <tr>
                	<td colspan=6>등록된 글이 없습니다.</td>
                </tr>
<?
	}
	else
	{
		while ($list->hasNext())
		{
			$row 				= & $list->next();
			$no					= $row->getNumber('no');
			$tdpt					= $row->getNumber('tdpt');
			//$disp_no			= $no - $totalcount + 1;
			$disp_no			= $no;
			$subject			= nohtml($row->getString('subject'));
			$writer_name		= nohtml($row->getString('writer_name'));
			$reg_date			= $row->getString('reg_date');
			$hit_count			= $row->getString('hit_count');
			$upload_file0		= nohtml($row->getString('upload_file0'));
			$file = "<a href='fd.html?b=$b&no=$no&file_name=$upload_file0' ><span class='fileUp'></span></a>";
?>
                <tr>
                	<td><?echo $disp_no?></td>
                    <? if ( $tdpt	> 0 )  {?>
                    <td class="re_title" onClick="v('<?echo $b?>', '<?echo $no?>');"><span class="reply"></span><?echo $subject?></td>
                    <? }else {?>
                    <td class="title" onClick="v('<?echo $b?>', '<?echo $no?>');"><?echo $subject?></td>
                    <? }?>
                    <td><?echo $upload_file0 == "" ? "" : $file?></td>
                    <td><?echo $writer_name?></td>
                    <td><?echo substr($reg_date, 0,10) ?></td>
                    <td><?echo $hit_count?></td>
                </tr>
<?
			}
		}
?>
			</table>

<form name=frm id=frm method=post action='' >
            <div class="BtnList">
            	<ul>
                    <li><input type="button" class="btn_write" onClick="wr('<?echo $b?>');" title="글쓰기"/></li>
                </ul>
            </div>
</form>
            <div class="pagination">
            	<? printPageList($page, $totalpage, $pagelistsize, $_SERVER['PHP_SELF'], $basic_param); ?>
            </div>
        </div>
    </div>
<!-- container 끝 -->

	<!-- footer start -->
	<? include("../_layout/footer.inc"); ?>
	<!-- footer end -->

</div>
</body>
</html>